<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('salesman'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员管理</title>
<link href="templates/style/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/forms.func.js"></script>
</head>
<body>
<div class="topToolbar"> <span class="title">会员管理</span> <a href="javascript:location.reload();" class="reload">刷新</a></div>
<form name="form" id="form" method="post" action="member_save.php">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="dataTable">
		<tr align="left" class="head">
			<td width="2%" height="36" class="firstCol"><input type="checkbox" name="checkid" id="checkid" onclick="CheckAll(this.checked);"></td>
			<td width="3%">ID</td>
			<td width="10%">用户名</td>
			<td width="10%">真实姓名</td>
			<td width="10%">手机号</td>
			<td width="15%">开户行地址</td>
			<td width="15%">银行卡号</td>
			<td width="5%">银行</td>
			<td width="5%">金额</td>
			<td width="5%" class="endCol" style="text-align: center;">状态</td>
		</tr>
		<?php
		$dopage->GetPage("SELECT * FROM `#@__salesman_extract` ");
		while($row = $dosql->GetArray())
		{
			// $usergroup = '';
			// $dosql->Execute("SELECT * FROM `#@__usergroup`",$row['id']);
			// while($row2 = $dosql->GetArray($row['id']))
			// {
			// 	if($row['expval'] >= $row2['expvala'] and
			// 	   $row['expval'] <= $row2['expvalb'])
			// 	{
			// 		$usergroup = '<span style="color:'.$row2['color'].'">'.$row2['groupname'].'</span>';
			// 	}
			// }

			// if($usergroup == '')
			// {
			// 	//系统不允许使用子查询
			// 	$r = $dosql->GetOne("SELECT MAX(expvalb) as expvalb FROM `#@__usergroup`");
            //
			// 	if(isset($r['expvalb']) && ($row['expval'] > $r['expvalb']))
			// 	{
			// 		$r = $dosql->GetOne("SELECT `groupname` FROM `#@__usergroup` WHERE expvalb=".$r['expvalb']);
			// 		$usergroup = $r['groupname'];
			// 	}
			// 	else
			// 	{
			// 		$usergroup = '参数获取失败';
			// 	}
			// }

			// $oauthico = '';

			// if($row['qqid'] != '')
			// 	$oauthico .= '<span class="qqico" title="QQ账号绑定"></span>';
            //
			// if($row['weiboid'] != '')
			// 	$oauthico .= '<span class="weiboico" title="微博账号绑定"></span>';
		?>
		<tr align="left" class="dataTr">
			<td height="60" class="firstCol"><input type="checkbox" name="checkid[]" id="checkid[]" value="<?php echo $row['id']; ?>" /></td>
            <td><?php echo $row['id']; ?></td>
            <td><?php echo $row['s_name']; ?></td>
            <td><?php echo $row['nickname']; ?></td>
            <td><?php echo $row['mobile']; ?></td>
            <td><?php echo $row['bank_add']; ?></td>
            <td><?php echo $row['bank_num']; ?></td>
            <td><?php echo $row['bank_name']; ?></td>
			<td><?php echo $row['money']; ?></td>


			<td style="text-align: center;"><?php if($row['status'] == 1){echo "<em style='font-style: normal;display: inline-block;width: 50px;line-height: 30px;background: #1b7e00c9;color: #fff;border-radius: 5px;font-size: 12px;'>已通过</em>";}else if($row['status'] == 2){echo "<em style=' font-style:normal; display: inline-block;width: 50px;line-height: 30px;background: #d92424c9;color: #fff;border-radius: 5px;font-size: 12px;'>已驳回</em>";}else{echo '<a href="#">审核中</a>';} ?></td>
		</tr>
		<?php
		}
		?>
	</table>
</form>
<?php

//判断无记录样式
if($dosql->GetTotalRow() == 0)
{
	echo '<div class="dataEmpty">暂时没有相关的记录</div>';
}
?>
<!-- <div class="bottomToolbar"><span class="selArea"><span>选择：</span> <a href="javascript:CheckAll(true);">全部</a> - <a href="javascript:CheckAll(false);">无</a> - <a href="javascript:DelAllNone('member_save.php');" onclick="return ConfDelAll(0);">删除</a></span> <a href="member_add.php" class="dataBtn">注册新会员</a> </div> -->
<div class="page"> <?php echo $dopage->GetList(); ?> </div>
<?php

//判断是否启用快捷工具栏
if($cfg_quicktool == 'Y')
{
?>
<!-- <div class="quickToolbar">
	<div class="qiuckWarp">
		<div class="quickArea"><span class="selArea"><span>选择：</span> <a href="javascript:CheckAll(true);">全部</a> - <a href="javascript:CheckAll(false);">无</a> - <a href="javascript:DelAllNone('member_save.php');" onclick="return ConfDelAll(0);">删除</a></span> <a href="member_add.php" class="dataBtn">注册新会员</a> <span class="pageSmall"> <?php echo $dopage->GetList(); ?> </span></div>
		<div class="quickAreaBg"></div>
	</div>
</div> -->
<?php
}
?>
</body>
</html>
